//
//  BattleViewController.h
//  PacIsBack
//
//  Created by Jérémy Brault on 21/01/10.
//  Copyright 2010 None. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MusicController.h"
#import "BattleProtocol.h"
@class InfoAreaViewController;
@class ActionSelectionViewController;


@interface BattleViewController : UIViewController {
	NSString* backGround;
	NSString* music;
	id<BattleProtocol> battle;
	id<CharacterProtocol> currentAttackOrigin;
	id<CharacterProtocol> currentAttackTarget;
	MusicController* player;
	UIImageView* backgroundView;
	UIImageView* defeatOrVictoryView;
	InfoAreaViewController* infoArea;
	ActionSelectionViewController* actionSelection;
	BOOL fightEnded;
}

@property(nonatomic,retain) NSString* backGround;
@property(nonatomic,retain) NSString* music;
@property(nonatomic,retain) MusicController* player;
@property(nonatomic,retain) id<CharacterProtocol> currentAttackOrigin;
@property(nonatomic,retain) id<CharacterProtocol> currentAttackTarget;
@property(nonatomic,retain) id<BattleProtocol> battle;
@property(nonatomic,retain) UIImageView* defeatOrVictoryView;
@property(nonatomic,retain) UIImageView* backgroundView;
@property(nonatomic,retain) InfoAreaViewController* infoArea;
@property(nonatomic,retain) ActionSelectionViewController* actionSelection;
@property(nonatomic,assign) BOOL fightEnded;

//-(id) initWithBackGround:(NSString*) initBG;

-(id) initForModel:(id<BattleProtocol>) model;

-(void) executeAttackFrom:(id<CharacterProtocol>) origin toTarget:(id<CharacterProtocol>) target;

-(void) attackInflictDamage;

-(void) defeat;

-(void) victory;

-(void) defeatOrVictoryAnimate;

-(void) defeatOrVictoryEndAnimation;

-(void) showInfo:(NSString*) info;

-(void) showAbilityAreaOfCharacter:(id<CharacterProtocol>) character;

-(void) removeAbilityArea;

@end
